package org.sems.sems.Mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.sems.sems.entity.SemsConfig;

import java.util.List;

@Mapper
public interface SemsConfigMapper {
    @Select("SELECT * FROM SEMS_CONFIG")
    List<SemsConfig> SelectAllConfig();

    @Update("UPDATE SEMS_CONFIG SET VALUE = #{value} WHERE ID = #{id}")
    int UpdateConfig(@Param("id") Integer id, @Param("value") String value);

    @Select("SELECT * FROM SEMS_CONFIG WHERE ID = #{id}")
    SemsConfig SelectConfigById(Integer id);

    int UpdateConfigByMybatisXml(SemsConfig semsConfig);

    /**
     * 批量查询配置信息
     *
     * @param ids 配置id列表
     */
    List<SemsConfig> selectByIds(@Param("ids") List<Integer> ids);
}
